package com.sdk.springbootadvancedsearch.domain.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class SortCondition {

    @ApiModelProperty("排序的字段名")
    @NotBlank(message = "排序的字段名不能为空")
    private String key;

    @ApiModelProperty("排序方式，可选值为:asc, desc")
    @NotBlank(message = "排序方式不能为空")
    private String orderBy;

    @ApiModelProperty("排序优先级，数字越小优先级越高")
    @NotNull(message = "排序优先级不能为空")
    private Integer sort;
}
